// 通用响应格式
export interface ApiResponse<T = any> {
    code: number
    message: string
    data: T
}

// 分页请求参数
export interface PaginationParams {
    page: number
    pageSize: number
}

// 分页响应格式
export interface PaginationResponse<T> {
    list: T[]
    total: number
    page: number
    pageSize: number
}

// 用户相关接口类型
export interface LoginParams {
    username: string
    password: string
}

export interface UserInfo {
    id: string
    username: string
    avatar: string
    email?: string
    role: string
}

// 帖子相关接口类型
export interface Post {
    id: string
    title: string
    content: string
    author: UserInfo
    createdAt: string
    updatedAt: string
    likes: number
    comments: number
}

export interface CreatePostParams {
    title: string
    content: string
}

export interface UpdatePostParams extends Partial<CreatePostParams> {
    id: string
} 